<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basepath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%--jstl使用--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- 引入 Bootstrap -->
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<html>
<head>
    <base href="<%=basepath %>"/>
    <meta charset="utf-8"/>
    <title>所有登录用户</title>


    <style>

        .btn1{
            text-align: center;
            padding: 5px;
            width: 20%;
            margin-top: 10px;
            background-image: linear-gradient(to right, #a6c1ee, #fbc2eb);

            color: #fff;
        }
    </style>
</head>
<body>


<div class="row clearfix">


    <div class="col-md-8 column">
<table class="table table-hover table-striped" style="background: khaki" >

    <thead>
    <tr>
        <th>登录id</th>
        <th>用户名</th>
        <th>用户密码</th>
        <th>是否管理员</th>
        <th>操作</th>
    </tr>
    </thead>

    <tbody>
    <c:forEach items="${userList}" var="user">
        <tr>

            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td>${user.isAdmin}</td>


            <td>
                <div class="row">
                    <div class="col-md-1 column">
                        <a class="btn btn-primary"href="${pageContext.request.contextPath}/account/deleteUserById?id=${user.id}">删除</a>
                    </div>
                </div>

            </td>
        </tr>

    </c:forEach>
    </tbody>
</table>

    </div>
</div>
<a class="btn1" href="${pageContext.request.contextPath}/account/findAll">返回账户界面</a>
</body>
</html>